﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ClockwiseAngleBetweenClockHands
{
    class Program
    {
        static void Main(string[] args)
        {
            double result = GetClockWiseAngle(10, 10);

            Console.WriteLine(result);

            Console.Read();
        }

        public static double GetClockWiseAngle(int hour, int minute)
        {
            double hourAngle, minuteAngle, angle;

            hourAngle = (60 * hour + minute) / 2;
            minuteAngle = minute * 6;

            angle = Math.Abs(hourAngle - minuteAngle);

            return angle > 180 ? 360 - angle : angle;
        }
    }
}